import Layout from '@/layout/index.vue'

const adminRouter = {
  path: '/admin',
  component: Layout,
  redirect: 'noRedirect',
  name: '安全管理',
  meta: {
    title: '安全管理',
    icon: 'lock',
    roles: ['admin:user:page', 'admin:role:page', 'admin:permission:tree']
  },
  children: [
    {
      path: 'user',
      component: () => import('@/views/sys/admin/user/index'),
      name: '用户管理',
      meta: { title: '用户管理', noCache: true, roles: ['sys:admin-user:page'] }
    },
    {
      path: 'role',
      component: () => import('@/views/sys/admin/role/index'),
      name: '角色管理',
      meta: { title: '角色管理', noCache: true, roles: ['sys:admin-role:page'] }
    },
    {
      path: 'permission',
      component: () => import('@/views/sys/admin/permission/index'),
      name: '权限管理',
      meta: { title: '权限管理', noCache: true, roles: ['sys:admin-permission:tree'] }
    }
  ]
}

export { adminRouter }
